<template>
	<div class="container">
		<ul>
			<li class="list-info-view-childen" v-for="(row, index) in PremisesGroupByCityList">
				<div class="import-title">{{row.cityName}}</div>
				<ul>
					<li class="view-childen-list" v-for="row1 in row.preGroupByCityList" v-bind:tId="row1.premisesId"  @click="decisionPremises(row1.premisesId,row1.premisesName)">{{row1.premisesName}}</li>
				</ul>
			</li>
		</ul>
	</div>
</template>
<script>
	export default{
		data(){
			return {
				PremisesGroupByCityList:[]
			}
		},
		components: {
		},
		mounted: function() {
	       this.initPremisesInfo();
		}, 
		methods:{
			initPremisesInfo:function(){
				var url = this.utilHelper.apiUrl+'/api/getPremisesGroupByCity.do';
				var body = {};
				body.params = {};
				this.$http.post(url,body).then((response)=>{
					var body = response.body;
					if(body.result==1){
						this.PremisesGroupByCityList = body.resData.list;
					}else{
						layer.msg("数据获取失败");
					}
					
				});
			},
			decisionPremises(tid,tName){
				this.$router.push({name: 'addCustomer', params: {id:tid,name: tName,spec:1}})
			}
		}
	}
</script>